The invention pertains to machine vision and, more particularly, to methods for image segmentation and object identification and defect detection.
In automated manufacturing, it is often important to determine the location, shape, size and/or angular orientation of an object being processed or assembled. For example, in automated wire bonding of integrated circuits, the precise location of leads in the "lead frame" and pads on the semiconductor die must be determined before wire bonds can be soldered them.
Although the human eye can readily distinguish between objects in an image, this is not historically the case for computerized machine vision systems. In the field of machine vision, the task of analyzing an image to isolate and identify its features is referred to as image segmentation. In an image of a lead frame, image segmentation can be employed to identify pixels in the image representing the leads, as well as those representing all other features, i.e., "background." By assigning values of "1" to the pixels representing leads, and by assigning values of "0" to the background pixels, image segmentation facilitates analysis of the image by other machine vision tools, such as "connectivity" analysis.
The prior art suggests a number of techniques for segmenting an image. Thresholding, for example, involves identifying image intensities that distinguish an object (i.e., any feature of interest) from its background (i.e., any feature not of interest). For example, in an image of a lead frame, thresholding can be used to find an appropriate shade of gray that distinguishes each pixel in the image as object (i.e., lead) or background, thereby, completing segmentation. More complex thresholding techniques generate multiple threshold values that additionally permit the object to be identified.
Connectivity analysis is employed to isolate the features in a thresholded image. This technique segregates individual features by identifying their component pixels, particularly, those that are connected to each other by virtue of horizontal, vertical or diagonal adjacency.
Though the segmentation techniques described above are useful in isolating features of simple objects, they are often of only limited value in identifying objects with complex backgrounds. This typically arises in defect detection, that is, in segmenting images to identify defects on visually complicated surfaces, such as the surface of a semiconductor die, a printed circuit board, and printed materials. In these instances, segmentation is used to isolate a defect (if any) on these complex surfaces. If the surface has no defects, segmentation should reveal no object and only background. Otherwise, it should reveal the defect in the image as clusters of 1's against a background 0's.
To aid in segmenting complicated images, the prior art developed golden template comparison (GTC). This is a technique for locating defects by comparing a feature under scrutiny (to wit, a semiconductor die surface) to a good image--or golden template--that is stored in memory. The technique subtracts the good image from the test image and analyzes the difference to determine if the expected object (e.g., a defect) is present. For example, upon subtracting the image of a good pharmaceutical label from a defective one, the resulting "difference" image would reveal missing words and portions of characters.
Before GTC inspections can be performed, it must be "trained" so that the golden template can be stored in memory. To this end, the GTC training functions are employed to analyze several good samples of a scene to create a "mean" image and "standard deviation" image. The mean image is a statistical average of all the samples analyzed by the training functions. It defines what a typical good scene looks like. The standard deviation image defines those areas on the object where there is little variation from part to part, as well as those areas in which there is great variation from part to part. This latter image permits GTC's runtime inspection functions to use less sensitivity in areas of greater expected variation, and more sensitivity in areas of less expected variation. In all cases, the edges present in the parts give rise a large standard deviation as a result of discrete pixel registration requirements, thus decreasing sensitivity in those regions.
At runtime, a system employing GTC captures an image of a scene of interest. Where the position of that scene is different from the training position, the captured image is aligned, or registered, with the mean image. The intensities of the captured image are also normalized with those of the mean image to ensure that variations illumination do not adversely affect the comparison.
The GTC inspection functions then subtract the registered, normalized, captured image from the mean image to produce a difference image that contains all the variations between the two. That difference image is then compared with a "threshold" image derived from the standard deviation image. This determines which pixels of the difference image are to be ignored and which should be analyzed as possible defects. The latter are subjected to morphology, to eliminate or accentuate pixel data patterns and to eliminate noise. An object recognition technique, such as connectivity analysis, can then be employed to classify the apparent defects.
Although GTC inspection tools have proven quite successful, they suffer some limitations. For example, except in unusual circumstances, GTC requires registration--i.e., that the image under inspection be registered with the template image. GTC also uses a standard deviation image for thresholding, which can result in a loss of resolution near edges due to high resulting threshold values. GTC is, additionally, limited to applications where the images are repeatable: it cannot be used where image-to-image variation results form changes in size, shape, orientation and warping.
An object of this invention, therefore, is to provide improved methods for machine vision and, more particularly, improved methods for image segmentation.
A further object is to provide such methods that can be used for defect identification.
Yet another object is to provide such methods that can be used in segmenting and inspecting repeatable, as well as non-repeatable, images.
Yet still another object is to provide such methods that do not routinely necessitate alignment or registration of an image under inspection with a template image.
Still yet a further object of the invention is to provide such methods that do not require training.
Still other objects of the invention include providing such machine vision methods as can be readily implemented on existing machine vision processing equipment, and which can be implemented for rapid execution without excessive consumption of computational power.